class LameSecurityFilters {
    def authenticateService

    def filters = {
        all(controller:'*', action:'*') {
            before = {
                
            }
            after = {
                
            }
            afterView = {
                
            }
        }

        topicActions(controller:'topic', action:'create|update|save|delete') {
            before = {
                def userInSession = authenticateService.userDomain()
                if(!userInSession) {
                    flash.message = "you should login to create topic"
                    redirect(controller:'login',action:'index')
                    return
                }
            }

            after = { model ->

            }
            afterView = {

            }
        }
    }
    
}
